package com.lejin.item.controller;


import com.lejin.item.entity.CourseContents;
import com.lejin.item.service.impl.CourseContentsServiceImpl;
import com.lejin.vo.ResultVO;
import org.checkerframework.checker.units.qual.A;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author luminghua
 * @since 2022-04-20
 */
@RestController
@RequestMapping("/item/course-contents")
public class CourseContentsController {

    @Autowired
    CourseContentsServiceImpl courseContentsService;

    @RequestMapping("findAllContentsAndChapterByOid/{oid}")
    public ResultVO findAllContentsAndChapterByOid(@PathVariable Integer oid){
        List<CourseContents> allContentsAndChapterByOid = courseContentsService.findAllContentsAndChapterByOid(oid);

        return new ResultVO(true,"查询成功",allContentsAndChapterByOid);
    }

}
